/**
 * Index.css - 首页样式
 * 包含英雄区、特性区、统计数据、案例展示、CTA、友情链接、广告等模块样式
 */

/* ========== 英雄区 ========== */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 8rem 0 6rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,197.3C1248,203,1344,149,1392,122.7L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

.hero-buttons .btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.btn-light-custom {
    background: #fff;
    color: #667eea;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-light-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-outline-light-custom {
    border: 2px solid #fff;
    color: #fff;
    background: transparent;
}

.btn-outline-light-custom:hover {
    background: #fff;
    color: #667eea;
}

.hero-image {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-image img {
    max-width: 100%;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

/* ========== 特性区块 ========== */
.features-section {
    padding: 6rem 0;
    background: #f8fafc;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.feature-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    border: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15), 0 16px 48px rgba(102, 126, 234, 0.1);
    border-color: #e0e7ff;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: #fff;
}

.feature-card h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
}

.feature-card p {
    color: #64748b;
    line-height: 1.8;
    margin: 0;
}

/* ========== 统计数据区 ========== */
.stats-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 5rem 0;
    color: #fff;
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ========== 案例展示区 ========== */
.showcase-section {
    padding: 6rem 0;
    background: #fff;
}

.showcase-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    border: 1px solid #f1f5f9;
}

.showcase-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.12), 0 24px 64px rgba(102, 126, 234, 0.08);
    border-color: #e0e7ff;
}

.showcase-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.showcase-content {
    padding: 2rem;
}

.showcase-content h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
}

.showcase-content p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.showcase-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 0.875rem;
    color: #667eea;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* ========== CTA区块 ========== */
.cta-section {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 6rem 0;
    color: #fff;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

/* ========== 友情链接样式 ========== */
.link-item {
    display: block;
    padding: 15px;
    background: white;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
    border: 1px solid #e0e0e0;
}

.link-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.link-logo {
    max-width: 100%;
    height: 50px;
    object-fit: contain;
}

.link-text {
    font-size: 14px;
    font-weight: 500;
    padding: 15px 5px;
}

/* ========== 广告位样式 ========== */
.ad-container {
    margin: 20px 0;
    text-align: center;
}

.ad-item {
    display: block;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    text-decoration: none;
}

.ad-item:hover {
    transform: scale(1.02);
}

.ad-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* 顶部广告 */
.top-ads-section {
    background: #fff;
    padding: 30px 0;
    border-bottom: 1px solid #e2e8f0;
}

.top-ad-item {
    display: block;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.top-ad-item:hover {
    opacity: 0.9;
}

.top-ad-item img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
}

/* 侧边广告 */
.side-ads-container {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    max-width: 180px;
    display: none;
}

@media (min-width: 1600px) {
    .side-ads-container {
        display: block;
    }
}

.side-ad-item {
    display: block;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    text-decoration: none;
    background: #fff;
}

.side-ad-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.side-ad-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* ========== 轮播图样式调整 ========== */
.slider-section {
    margin-bottom: 40px;
}

.carousel-caption h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.carousel-caption p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

/* ========== 热门内容区样式 ========== */
.hot-content-section {
    padding: 5rem 0;
    overflow-x: hidden;
}

.content-box {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    height: 100%;
    transition: all 0.3s ease;
}

.content-box:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
}

.content-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.content-box-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-box-header i {
    color: #667eea;
}

.more-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.3s ease;
}

.more-link:hover {
    color: #764ba2;
    gap: 0.5rem;
}

/* 文章列表 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.article-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 12px;
    background: #fafbfc;
    border: 1px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
}

.article-item:hover {
    background: #fff;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.08);
    transform: translateX(8px);
    border-color: #e0e7ff;
}

.article-thumb {
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    width: 140px;
    height: 105px;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-item:hover .article-thumb img {
    transform: scale(1.1);
}

.article-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.article-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.3s ease;
}

.article-item:hover h4 {
    color: #667eea;
}

.article-item h4 a {
    color: inherit;
    text-decoration: none;
}

.article-excerpt {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0.5rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-item .article-meta {
    display: flex;
    gap: 1.25rem;
    color: #94a3b8;
    font-size: 0.85rem;
    margin-top: auto;
}

.article-meta i {
    margin-right: 0.25rem;
}

/* 排行榜 */
.rank-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 0.75rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.rank-item:hover {
    background: #f8fafc;
    border-color: #e0e7ff;
    transform: translateX(4px);
}

.rank-num {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
}

.rank-top {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.rank-normal {
    background: #f1f5f9;
    color: #64748b;
}

.rank-title {
    flex: 1;
    color: #1e293b;
    text-decoration: none;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s ease;
    font-weight: 500;
    line-height: 1.4;
}

.rank-title:hover {
    color: #667eea;
}

.rank-count {
    flex-shrink: 0;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
    min-width: 40px;
    text-align: right;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: #f1f5f9;
    border-radius: 20px;
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 0.25rem;
}

.tag-level-1 {
    font-size: 0.85rem;
    opacity: 0.7;
}

.tag-level-2 {
    font-size: 0.9rem;
    opacity: 0.8;
}

.tag-level-3 {
    font-size: 1rem;
    opacity: 0.9;
}

.tag-level-4 {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 1;
}

.tag-level-5 {
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff !important;
    opacity: 1;
}

.tag-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 随机图片 */
.random-images {
    margin-top: 1rem;
}

.random-img-item {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.random-img-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.random-img-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

.random-img-item:hover::after {
    opacity: 1;
}

.random-img-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.random-img-item:hover img {
    transform: scale(1.1);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #94a3b8;
}

.empty-state p {
    margin: 0;
    font-size: 0.95rem;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .carousel-caption h2 {
        font-size: 1.5rem;
    }

    .carousel-caption p {
        font-size: 0.9rem;
    }

    .link-logo {
        height: 40px;
    }

    .article-item img {
        width: 80px;
        height: 60px;
    }

    .rank-title {
        font-size: 0.85rem;
    }

    .tag-item {
        font-size: 0.85rem;
        padding: 0.3rem 0.8rem;
    }
}
